#include <iostream>
#include <string>
using namespace std;

int main()
{
	string s, t;
	cin >> s;
	cin >> t;
	int q, l1, r1, l2, r2;
	cin >> q;
	while(q--)
	{
		cin >> l1 >> r1;
		cin >> l2 >> r2;
		string s1 = s.substr(l1 - 1, r1 - l1 + 1);
		string s2 = t.substr(l2 - 1, r2 - l2 + 1);
		if(s1 > s2)
			cout << "erfusuer" << endl;
		else if(s1 < s2)
			cout << "yifusuyi" << endl;
		else
			cout << "ovo" << endl;
	}
	return 0;
}
